package com.tcs.tsrm.beans;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

public class ClusteringThresholds {
	private int motifWidth;
	private int sensorIndex;
	private String sensorName;
	private String algorithm;
	private String dataInputPath;
	private double devFilterThres;
	private double coinRadius;
	private int support;
	private int birchB;
	private int reducedDim;
	private boolean statLshSingletonRem;
	private boolean lshSingletonRemoval;
	private boolean printOriginalMatrix;
	private boolean printNonTrivialMatrix;
	private boolean printCentroids;
	private boolean printClusteringStats;
	private boolean printClusters;
	private boolean printOrgSubsClusters;
	private boolean printClustersRedDim;
	private boolean randomization = false;
	private boolean debug;
	private boolean printSingletons;
	private String inputSpecFile;
	private String splittingLimits;
	private String originType;

	private boolean removeSingletons;

	/**
	 * @param inputSpecPropFile
	 */
	public ClusteringThresholds(String inputSpecPropFile) {
		this.setInputSpecFile(inputSpecPropFile);
		Properties prop = new Properties();
		try {
			prop.load(new FileInputStream("input-spec/" + inputSpecPropFile
					+ ".properties"));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		this.setInputSpecFile(inputSpecPropFile);
		this.motifWidth = Integer.valueOf(prop.getProperty("motifWidth"));
		this.sensorIndex = Integer.valueOf(prop.getProperty("sensorIndex"));
		this.support = Integer.valueOf(prop.getProperty("support"));
		this.sensorName = prop.getProperty("sensorName");
		this.algorithm = prop.getProperty("algorithm");
		this.devFilterThres = Double
				.valueOf(prop.getProperty("devFilterThres"));
		this.coinRadius = Double.valueOf(prop.getProperty("coinRadius"));
		this.printClusteringStats = Boolean.valueOf(prop
				.getProperty("printClusteringStats"));
		this.printClusters = Boolean.valueOf(prop.getProperty("printClusters"));
		this.printOrgSubsClusters = Boolean.valueOf(prop
				.getProperty("printOrgSubsClusters"));
		this.printOriginalMatrix = Boolean.valueOf(prop
				.getProperty("printOriginalMatrix"));
		this.printNonTrivialMatrix = Boolean.valueOf(prop
				.getProperty("printNonTrivialMatrix"));
		this.printCentroids = Boolean.valueOf(prop
				.getProperty("printCentroids"));
		this.printClustersRedDim = Boolean.valueOf(prop
				.getProperty("printClustersRedDim"));
		this.birchB = Integer.valueOf(prop.getProperty("birchB"));
		this.splittingLimits = prop.getProperty("splittingLimits");
		this.debug= Boolean.valueOf(prop
				.getProperty("debug"));
	}



	public ClusteringThresholds(String inputSpecPropFile, String runType) {
		Properties prop = new Properties();
		try {
			prop.load(new FileInputStream("input-spec/" + inputSpecPropFile
					+ ".properties"));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		this.setInputSpecFile(inputSpecPropFile);
		this.motifWidth = Integer.valueOf(prop.getProperty("motifWidth"));
		this.sensorIndex = Integer.valueOf(prop.getProperty("sensorIndex"));
		this.support = Integer.valueOf(prop.getProperty("support"));
		this.sensorName = prop.getProperty("sensorName");
		this.algorithm = prop.getProperty("algorithm");
		this.devFilterThres = Double
				.valueOf(prop.getProperty("devFilterThres"));
		this.coinRadius = Double.valueOf(prop.getProperty("coinRadius"));
		this.printClusteringStats = Boolean.valueOf(prop
				.getProperty("printClusteringStats"));
		this.printClusters = Boolean.valueOf(prop.getProperty("printClusters"));
		this.printOrgSubsClusters = Boolean.valueOf(prop
				.getProperty("printOrgSubsClusters"));
		this.printOriginalMatrix = Boolean.valueOf(prop
				.getProperty("printOriginalMatrix"));
		this.printNonTrivialMatrix = Boolean.valueOf(prop
				.getProperty("printNonTrivialMatrix"));
		this.printCentroids = Boolean.valueOf(prop
				.getProperty("printCentroids"));
		this.printClustersRedDim = Boolean.valueOf(prop
				.getProperty("printClustersRedDim"));
		this.birchB = Integer.valueOf(prop.getProperty("birchB"));
		this.splittingLimits = prop.getProperty("splittingLimits");
		this.debug= Boolean.valueOf(prop
				.getProperty("debug"));
	}


	public int getMotifWidth() {
		return motifWidth;
	}

	public void setMotifWidth(int motifWidth) {
		this.motifWidth = motifWidth;
	}

	public void setSupport(int support) {
		this.support = support;
	}

	public int getSupport() {
		return support;
	}

	public int getSensorIndex() {
		return sensorIndex;
	}

	public void setSensorIndex(int sensorIndex) {
		this.sensorIndex = sensorIndex;
	}

	public String getSensorName() {
		return sensorName;
	}

	public void setSensorName(String sensorName) {
		this.sensorName = sensorName;
	}

	public String getAlgorithm() {
		return algorithm;
	}

	public void setAlgorithm(String algorithm) {
		this.algorithm = algorithm;
	}

	public String getDataInputPath() {
		return dataInputPath;
	}

	public void setDataInputPath(String dataInputPath) {
		this.dataInputPath = dataInputPath;
	}

	public double getDevFilterThres() {
		return devFilterThres;
	}
	public boolean isRemoveSingletons() {
		return removeSingletons;
	}

	public void setRemoveSingletons(boolean removeSingletons) {
		this.removeSingletons = removeSingletons;
	}
	public void setDevFilterThres(double devFilterThres) {
		this.devFilterThres = devFilterThres;
	}
	public boolean isStatsLSH() {
		return statLshSingletonRem;
	}

	public void setStatsLSH(boolean statsLSH) {
		this.statLshSingletonRem = statsLSH;
	}
	public double getCoinRadius() {
		return coinRadius;
	}

	public boolean isPrintSingletons() {
		return printSingletons;
	}

	public void setPrintSingletons(boolean printSingletons) {
		this.printSingletons = printSingletons;
	}

	public void setCoinRadius(double coinRadius) {
		this.coinRadius = coinRadius;
	}

	public static void main(String[] args) {

	}

	public boolean isPrintClusteringStats() {
		return printClusteringStats;
	}

	public void setPrintClusteringStats(boolean printClusteringStats) {
		this.printClusteringStats = printClusteringStats;
	}

	public boolean isPrintClusters() {
		return printClusters;
	}

	public void setPrintClusters(boolean printClusters) {
		this.printClusters = printClusters;
	}

	public boolean isPrintOrgSubsClusters() {
		return printOrgSubsClusters;
	}

	public void setPrintOrgSubsClusters(boolean printOrgSubsClusters) {
		this.printOrgSubsClusters = printOrgSubsClusters;
	}

	public boolean isLshSingletonRemoval() {
		return lshSingletonRemoval;
	}

	public void setLshSingletonRemoval(boolean lSH) {
		lshSingletonRemoval = lSH;
	}

	public int getB() {
		return birchB;
	}

	public void setB(int b) {
		birchB = b;
	}


	public String getInputSpecFile() {
		return inputSpecFile;
	}

	public void setInputSpecFile(String inputSpecFile) {
		this.inputSpecFile = inputSpecFile;
	}

	public int getReducedDim() {
		return reducedDim;
	}

	public void setReducedDim(int reducedDim) {
		this.reducedDim = reducedDim;
	}

	public boolean isPrintCentroids() {
		return printCentroids;
	}

	public void setPrintCentroids(boolean printCentroids) {
		this.printCentroids = printCentroids;
	}

	public boolean isPrintNonTrivialMatrix() {
		return printNonTrivialMatrix;
	}

	public void setPrintNonTrivialMatrix(boolean printNonTrivialMatrix) {
		this.printNonTrivialMatrix = printNonTrivialMatrix;
	}

	public boolean isPrintOriginalMatrix() {
		return printOriginalMatrix;
	}

	public void setPrintOriginalMatrix(boolean printOriginalMatrix) {
		this.printOriginalMatrix = printOriginalMatrix;
	}

	public boolean isPrintClustersRedDim() {
		return printClustersRedDim;
	}

	public void setPrintClustersRedDim(boolean printClustersRedDim) {
		this.printClustersRedDim = printClustersRedDim;
	}

	public boolean isRandomization() {
		return randomization;
	}

	public void setRandomization(boolean randomization) {
		this.randomization = randomization;
	}

	public String getSplittingLimits() {
		return splittingLimits;
	}

	public void setSplittingLimits(String splittingLimits) {
		this.splittingLimits = splittingLimits;
	}

	public String getOriginType() {
		return originType;
	}

	public void setOriginType(String originType) {
		this.originType = originType;
	}



	public boolean isDebug() {
		return debug;
	}



	public void setDebug(boolean debug) {
		this.debug = debug;
	}



}
